<template>
    <div id="myLoad" v-show="show">
        <div>{{msg}}</div>
    </div>
</template>

<script>
export default {
  name: 'myLoad',
  props: {
    show: Boolean, // 控制loading显示和隐藏
    msg: {
        type: String,
        default: '拼命加载中...'
    } // 控制显示的信息
  }
 }
</script>

<style scoped>
#myLoad {
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.1);
    display: flex;
    justify-content: center;
    align-items: center;
    position: fixed;
    top: 0;
    left: 0;
}
#myLoad div {
    background-color: rgba(0, 0, 0, 0.6);
    color: #fff;
    width: 150px;
    height: 150px;
    text-align: center;
    border-radius: 10px;
    line-height: 40px;
}
</style>